package jmu.db.test.xtest.common ;


public class Identity
{
    private int id ;
    private String name = null ;
    private String description = null ;

    public Identity ( final int id )
    {
        setId ( id ) ;
    }

    public boolean equals ( final Identity i )
    {
        return (this == i) || (hashCode () == i.hashCode ()) ;
    }

    @Override
    public boolean equals ( final Object o )
    {
        if ( ! (o instanceof Identity) )
        {
            return false ;
        }

        return equals ( (Identity) o ) ;
    }

    public String getDescription ()
    {
        return description ;
    }

    public int getId ()
    {
        return id ;
    }

    public String getName ()
    {
        return name ;
    }

    @Override
    public int hashCode ()
    {
        return id ;
    }

    public void setDescription ( String description )
    {
        this.description = description ;
    }

    public void setName ( final String name )
    {
        this.name = name ;
    }

    private void setId ( final int id )
    {
        this.id = id ;
    }
}
